<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%@ page import="com.onlineMIS.ORM.DAO.JspLoadResult"%>

<!-- 
	注入： // include file="../common/JRComponent.jsp"  
	描述： 此组件为前后JSP页面前后交互的公共组件，需要获取jsp页面从后台获取的响应结果时，可以注入此组件
 -->

<script>

/**
 * 加载jsp页面的响应结果
 */
function loadResult(){
	$.post("action/commonJSONAction!selectLoadResult",null, backProcess,"json");	 
}
function backProcess(data){
	//关闭加载中
	$.messager.progress('close');
	var code = data.code;
	if (code == <%=JspLoadResult.LOAD_RESULT_INIT%>){
		return;
	}else if (code == <%=JspLoadResult.LOAD_RESULT_ABNORMAL%>){
		$.messager.alert('提示', data.msg,'warning').window({
			  width: 400,  
			  height: 300  
			});

	}else if (code == <%=JspLoadResult.LOAD_RESULT_SUCCESS%>){
		$.messager.alert('提示', data.msg,'info').window({
			  width: 400,  
			  height: 300  
			});
	}else if (code == <%=JspLoadResult.LOAD_RESULT_FAIL%>){
		$.messager.alert('提示',data.msg,'error');
	}
	//重置jsp交互响应
	$.post("action/commonJSONAction!resetJspResult",null, jspResultResetBackProcess,"json");
}

function jspResultResetBackProcess(data){
	
}
</script>



